package com.jeesite.modules.dataScreen.web;

import com.jeesite.modules.dataScreen.web.vo.Result;
import com.jeesite.modules.dataScreen.web.vo.ShouyeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author: zhaosenlin
 * @date: 2024/5/14 14:08
 */
@RestController
@Api(tags = "新首页接口")
@RequestMapping("/shouye")
@Slf4j
public class ShouyeApi extends BaseController {

    @ApiOperation("客运服务")
    @GetMapping("kyfw")
    public Result<ShouyeVo.A> kyfw() {
        Map<String, Object> fieldMean = new LinkedHashMap<>();
        fieldMean.put("title", "成渝双城经济圈");
        ShouyeVo.A c = new ShouyeVo.A();
        fillDataByTiaoBao(allData(), ShouyeVo.A.class, c);
        fillFieldInfo(c, fieldMean);
        return Result.OK(c).apiInfo(fieldMean);
    }

    @ApiOperation("货运服务")
    @GetMapping("hyfw")
    public Result<ShouyeVo.B> hyfw() {
        Map<String, Object> fieldMean = new LinkedHashMap<>();
        fieldMean.put("title", "西部陆海新通道");
        ShouyeVo.B c = new ShouyeVo.B();
        fillDataByTiaoBao(allData(), ShouyeVo.B.class, c);
        fillFieldInfo(c, fieldMean);
        return Result.OK(c).apiInfo(fieldMean);
    }

    @ApiOperation("安全管理")
    @GetMapping("aqgl")
    public Result<ShouyeVo.C> aqgl() {
        Map<String, Object> fieldMean = new LinkedHashMap<>();
        fieldMean.put("title", "西部陆海新通道");
        ShouyeVo.C c = new ShouyeVo.C();
        fillDataByTiaoBao(allData(), ShouyeVo.C.class, c);
        fillFieldInfo(c, fieldMean);
        return Result.OK(c).apiInfo(fieldMean);
    }

    @ApiOperation("综合执法")
    @GetMapping("zhzf")
    public Result<ShouyeVo.D> zhzf() {
        Map<String, Object> fieldMean = new LinkedHashMap<>();
        fieldMean.put("title", "西部陆海新通道");
        ShouyeVo.D c = new ShouyeVo.D();
        fillDataByTiaoBao(allData(), ShouyeVo.D.class, c);
        fillFieldInfo(c, fieldMean);
        return Result.OK(c).apiInfo(fieldMean);
    }

}
